import axios from "axios";
import NProgress from "nprogress"
import "nprogress/nprogress.css"

import loginSvc from "./loginSvc"



axios.defaults.headers.common["Content-Type"]="application/json"

// 添加一个请求拦截器
axios.interceptors.request.use(function (config) {
  NProgress.start();
    return config;
  }, function (error) {
    return Promise.reject(error);
  });

// 添加一个响应拦截器
axios.interceptors.response.use(function (response) {
    NProgress.done();
    return response;
  }, function (error) {
    NProgress.done();
    return Promise.reject(error);
  });


 const api= {
    loginSvc
  }
export {api};